Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vec to f a #420

Merged
merged 9 commits into from
May 8, 2022
Merged

vec to f a #420

merged 9 commits into from
May 8, 2022

Conversation

sorki
Copy link
Contributor

@sorki sorki commented May 6, 2022

Expands vec to f a and adds Applicative and Eq constraints.

Allows us to drop some redundancy and treat our previous vec as functors. Additionally some identities like translate (pure 0) are now discarded.

@@ -35,7 +35,7 @@ import Test.QuickCheck
forAll)
import Data.Foldable ( for_ )
import Test.Hspec.QuickCheck (prop)
import Linear (V2(V2), V3(V3), V4(V4), (^*) , Epsilon(nearZero))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't removing this going to cause problems with values really close to zero?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't able to hit a problem with it even with quite large --qc-max-success. It was only added recently to fix disabled scaling property in 7eff263#diff-cb79804fa5faf09727f9120b83f037c50a213c44faf3058e604a42fccc967655L138-R143 but this is more elegant since we can just use Eq now.

@julialongtin julialongtin merged commit 0f89102 into Haskell-Things:master May 8, 2022
@sorki sorki mentioned this pull request Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants